package pers.liyan.shi.ribbon;

import com.netflix.loadbalancer.IRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import pers.liyan.shi.ribbon.MyLBRule;

/**
 * 自定义 Ribbon 客户端配置
 * @author shily
 * @date 2019/5/24 11:14
 */
@Configuration
public class MyRibbonConfig {

    /**
     * 注入自定义的负载均衡策略
     */
    @Bean
    IRule myRule(){
        return new MyLBRule();
    }


}
